package org.example.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.entity.Task;
import org.example.entity.UserProject;
import org.example.mapper.TaskMapper;
import org.example.mapper.UserprojectMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TaskService extends ServiceImpl<TaskMapper, Task> {
    @Resource
    TaskMapper taskMapper;
    public List<Task> selectTask(String projectName){
        return taskMapper.selectTask(projectName);
    }

    public void updateTaskStatus(Integer taskId, Boolean completed) {
        taskMapper.updateTaskStatus( completed,taskId);
    }
}
